"use strict";

var startList = function () {
    var i,
        navRoot,
        node,
        onMouseOver,
        onMouseOut;

    if (document.all && document.getElementById) {
        navRoot = document.getElementById("main_page_nav");
        
        onMouseOver = function () {
            this.className += " over";
        };
        
        onMouseOut = function () {
            this.className = this.className.replace(" over", "");
        };
        
        for (i = 0; i < navRoot.childNodes.length; i += 1) {
            node = navRoot.childNodes[i];
            if (node.nodeName === "LI") {
                node.onmouseover = onMouseOver;
                node.onmouseout = onMouseOut;
            }
        }
    }
};

$(document).ready(startList);
